home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 12 - 1996 / 12.12 Dec 96 / Custom AppMaker 2 / USoundPlayer / USoundPlayer.h < prev   
Encoding:
Text File  |  1996-01-12  |  1.7 KB  |  50 lines  |  [TEXT/MMCC]

  1. // ===========================================================================
  2. //    USoundPlayer.h                    © 1995, Éric Forget. All rights reserved.
  3. // ===========================================================================
  4. //    
  5. //    ************************************************************************
  6. //    *                                                                      *
  7. //    *    Before using this code you should read the "License Agreement"     *
  8. //    *    document and agree with it.                                        *
  9. //    *                                                                      *
  10. //    ************************************************************************
  11. //
  12. //    Instruction and usage notes are in the USoundPlayer.cp file.
  13. //
  14. // ---------------------------------------------------------------------------
  15.  
  16.  
  17. #pragma once
  18.  
  19. #include    <Sound.h>
  20. #include    <LPeriodical.h>
  21.  
  22.  
  23. // ---------------------------------------------------------------------------
  24. //        • Class USoundPlayer
  25. // ---------------------------------------------------------------------------
  26.  
  27. class USoundPlayer    : public LPeriodical
  28. {
  29. public:
  30.     
  31.     static void                    Initialize();
  32.     static void                    Dispose();
  33.     static void                    PlaySound(ConstStr255Param    inSoundName);
  34.     static void                    PlaySound(const char*        inSoundName);
  35.     static void                    PlaySound(ResIDT            inSoundID);
  36.     static void                    PlaySound(SndListHandle        inSoundHandle);
  37.     
  38.     virtual    void                SpendTime(const EventRecord &inMacEvent);
  39.     
  40. protected:
  41.     static USoundPlayer            *sSoundPlayer;
  42.     static SndListHandle        sSoundHandle;
  43.     static SndChannelPtr        sSoundChannel;
  44.     
  45.     
  46.     static void                    PlaySoundHandle(SndListHandle inSoundHandle);
  47.     static void                    StopCurrentSound();
  48. };
  49.  
  50.